function selectFrom(lowerValue, upperValue) {
  let choices = upperValue - lowerValue + 1;
  return Math.floor(Math.random() * choices + lowerValue);  // Math.floor 向下取整  12.5 取 12
}

let num = selectFrom(2, 10); // 2 ~ 10 范围内的值   [2, 10] 包含 2 和 10
console.log(num);
